#pragma once
/*--------------------------------------------------------------------------------
 * Adaptive Intelligence - Native Win32 API Class Library
 * Version 2.00
 * 
 * Free Space Block Class
 *      Represents a block of free space on a drive.
 *------------------------------------------------------------------------------*/

/*--------------------------------------------------------------------------------
 * System Imports
 *------------------------------------------------------------------------------*/
#include "stdafx.h"

using namespace System;
using namespace System::Collections;

namespace Adaptive
{
	namespace Foundation
	{
		namespace IO
		{
			/// <summary>
			/// Represents a block of free space on a drive.
			/// </summary>
			public ref class FreeSpaceBlock
			{
			public:
				/*------------------------------------------------------------------------
				 * Constructor / Dispose / Destructor Methods
				 *----------------------------------------------------------------------*/
				#pragma region Constructor / Dispose / Destructor Methods
				/// <summary>
				/// Initializes a new instance of the class
				/// </summary>
				/// <remarks>
				/// This is the default constructor.
				/// </remarks>
				FreeSpaceBlock();
				/// <summary>
				/// Initializes a new instance of the class to the specified start position
				/// and size.
				/// </summary>
				/// <param name="startCluster">The logical cluster at which the block
				/// begins.</param>
				/// <param name="clusterLength">
				/// The size of the block in 4K clusters.
				/// </param>
				FreeSpaceBlock(__int64 startCluster, __int64 clusterLength);
				#pragma endregion

				/*------------------------------------------------------------------------
				 * Public Properties
				 *----------------------------------------------------------------------*/
				#pragma region Public Properties
				/// <summary>
				/// Gets or sets the number of the cluster at which the free space begins.
				/// </summary>
				/// <value>
				/// The logical cluster number at which the free space begins.
				/// </value>
				property __int64 StartCluster { __int64 get(); void set(__int64 value); }
				/// <summary>
				/// Gets or sets the number of the clusters the free space occupies.
				/// </summary>
				/// <value>
				/// The number of clusters being occupied.
				/// </value>
				property __int64 ClusterSize { __int64 get(); void set(__int64 value); }
				/// <summary>
				/// Gets the number of bytes the free space occupies.
				/// </summary>
				/// <value>
				/// The number of bytes being occupied.
				/// </value>
				property __int64 Size { __int64 get(); }

				#pragma endregion

			private:
				/*------------------------------------------------------------------------
		         * Private Member Declarations
				 *----------------------------------------------------------------------*/
				#pragma region Private Member Declarations

				__int64 _startCluster;
				__int64 _clusterLength;

				#pragma endregion
			};
		}
    }
}
